// https://iai.sh.cn/problem/406
#include <bits/stdc++.h>
using namespace std;
int num[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

// 判断是否是闰年
bool run(int year) {
  if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
    return true;
  else
    return false;
}
int main() {
  int year, month, day;
  char hua;
  cin >> year >> hua >> month >> hua >> day;
  if (run(year))
    num[2] = 29;
  int newd = day + 14;
  if (newd > num[month]) {
    newd -= num[month];
    month++;
    if (month > 12) {
      year++;
      month = 1;
    }
  }

  cout << year << '-' << month << '-' << newd;

  return 0;
}